package com.xyb.entity;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;

/**
 * (BizChart)实体类
 *
 * @author makejava
 * @since 2021-09-12 19:02:04
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class BizChart implements Serializable {
    private static final long serialVersionUID = -49821520330710241L;
    public interface insert{};
    public interface update{};
    public interface status{};
    /**
    * 主键id
    */
    @NotNull(message = "chartId不能为空",groups = {BizChart.update.class,BizChart.status.class})
    private Long chartId;

    /**
     * 图片id
     */
    private Long fileId;
    /**
    * 图片url
    */
    @NotBlank(message = "图片url不能为空",groups = {BizChart.insert.class,BizChart.update.class})
    @Length(max = 255,message = "图片url不能超过255个字符",groups = {BizChart.insert.class,BizChart.update.class})
    private String chartUrl;
    /**
    * 链接地址url
    */
    @NotBlank(message = "链接url不能为空",groups = {BizChart.insert.class,BizChart.update.class})
    @Length(max = 255,message = "链接url不能超过255个字符",groups = {BizChart.insert.class,BizChart.update.class})
    private String linkUrl;
    /**
    * 状态 1在用 0冻结
    */
    @NotNull(message = "状态不能为空",groups = {BizChart.status.class})
    private Integer status;
    /**
    * 排序
    */
    private Integer showOrder;

}